home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
TPUG Xtras
/
Xtras
/
progdisk.d64
/
sound
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2009-02-07
|
3KB
|
176 lines
10 POKE53281,1:POKE53280,6
20 PRINTCHR$(142)
30 PRINT"[147]"
40 PRINTTAB(14)" [146]"
50 PRINTTAB(14)" SOUND EFFECTS [146]"
60 PRINTTAB(14)" [146]"
70 PRINT"[151] THIS IS A SIMPLE DEMONSTRATION OF"
80 PRINT" SOME OF THE SOUND EFFECTS THAT CAN"
90 PRINT" BE GENERATED ON THE COMMODORE 64."
100 PRINTTAB(7)"1[146]. ALIEN";
110 PRINTTAB(25)"4[146]. CLAP "
120 PRINTTAB(7)"2[146]. BELLS ";
130 PRINTTAB(25)"5[146]. RAYGUN "
140 PRINTTAB(7)"3[146]. BOMB ";
150 PRINTTAB(25)"6[146]. SIREN "
170 PRINT" PRESS THE NUMBER OF SOUND EFFECT YOU"
180 PRINTTAB(14)"WISH TO HEAR"
190 GETA$:IFA$=""THEN190
200 A=VAL(A$):IFA<1ORA>6THEN190
210 PRINT"[147]":ONAGOSUB230,580,390,700,1150,1290
214 FOR I=1TO1000:NEXTI
215 FOR X=1 TO 24:POKE 54272+X,0 : NEXT
220 GOTO 30
230 REM >> ALIEN SOUND EFFECT <<
240 :
250 FOR X=1 TO 24:POKE 54272+X,0 : NEXT
260 :
270 REM ** SOUND SUBROUTINE **
280 :
290 S=54272:S2=54279
300 POKE S+24,15
310 POKE S+5,50:POKES+5,50
320 FOR X=1 TO 90
330 POKE S+1,RND(X)*32+50:POKES2+1,RND(X)*32+48
340 : POKE S+4,17:POKES2+4,17
350 FOR I=1 TO 20: NEXT
360 POKE S+4,16:POKES2+4,16
370 NEXT X
380 RETURN
390 REM >>> BOMB SOUND EFFECT <<<
400 FOR X=1TO 24: POKE 54272+X,0: NEXT
410 :
420 REM ** SOUND SUBROUTINE **
430 :
440 S=54272:S1=S+1:V=15
450 POKE S+24,V
460 POKE S+5,12*16
470 POKE S+6,15*16+10
480 FOR K= 255 TO 2STEP -1
490 POKE S1,K
500 POKE S,210
510 POKE S+4,17
520 FOR D=1 TO 5 : NEXT D
530 NEXT K
540 POKE S+24,15:SA=54279
550 POKE S+4,128:POKESA+4,128
560 POKE S,18:POKE S1,21:POKESA,82:POKESA+1,100
570 RETURN
580 REM **BELL:: **********3
590 FOR J=1 TO 3
595 S=54272
600 FOR L=0 TO 24:POKE S+L,0:NEXT
610 POKE S+24,15
620 FOR Q=1TO3
630 FOR W=1TO200:NEXTW
635 IF Q=3 THEN S=54286
640 IF Q=2 THEN S=54279
645 IF Q=1 THEN S=54272
650 POKE S,102:POKE S+1,194:POKES+5,9:POKES+6,0
660 POKE S+4,21
670 FOR T=1 TO 900:NEXT
680 NEXTQ,J
690 POKE S+4,20:POKE24+S,0:RETURN
700 REM CLAP ************ 4
710 S=54272
715 FOR C=1TO5
720 FOR L=0 TO 24:POKE S+L,0:NEXT
730 FORJ=1TO10:NEXT
740 POKE S,240 :POKE S+1,33
750 POKE S+5,8 :POKE S+22,104
760 POKE S+23,1 :POKE S+24,79
770 POKE S+4,129
775 NEXT C
780 FOR T=1 TO 200:NEXT
790 POKE S+4,128
800 POKE S+24,0:RETURN
810 :
820 PRINT"[147] HIT ANY KEY FOR GUNFIRE":REM ************ 5
830 PRINT" ( * TO END DEMO ) "
840 GET A$ : IF A$="" THEN 840
850 IF A$="*" THEN 880
860 GOSUB 910: REM SOUND SUBROUTINE
870 GOTO 820
880 FOR X=1TO24: POKE 54272+X,0 : NEXT
890 RETURN
900 :
910 REM * SOUND SUBROUTINE *
920 :
930 S=54272:S2=54279
940 POKE S+24,15
950 POKE S+5,9:POKES2+5,9
960 POKE S+1,20
970 POKE S+4,128:POKES2+4,128
980 FOR D=1 TO 10: NEXT D
990 POKE S+4,129:POKES2+4,129
1000 RETURN
1010 REM *** PONG ***
1015 FOR P=1TO5
1020 FOR X=1TO24:POKE 54272+X,0 : NEXTX
1030 REM ** SOUND SUBROUTINE **
1040 S=54272
1050 FOR U=1TO3
1060 POKE S+1,20
1070 POKE S+5,9
1080 POKE S+6,9
1090 POKE S+24,15
1100 POKE S+4,17
1110 FOR D=1 TO 40: NEXT D
1120 NEXTU,P
1130 POKE S+4,16:POKES+24,0
1140 RETURN
1150 PRINT
1160 FOR X=1TO24 : POKE 54272+X,0: NEXT
1170 REM ** SOUND SUBROUTINE **
1180 S=54272
1190 POKE S+24,15
1200 POKE S+6,240
1210 POKE S+4,17
1220 FOR A=1 TO 10
1230 FOR X= 1 TO 255 STEP 25
1240 POKE S+1,X
1250 NEXT X
1260 NEXT A
1270 POKE S+4,32
1280 RETURN
1290 REM SIREN ****** 6
1300 S=54272
1310 FOR L=0 TO 24:POKE S+L,0:NEXT
1320 POKE S+14,5 :POKE S+18,16
1330 POKE S+3,1 :POKE S+24,143
1340 POKE S+6,240:POKE S+4,65
1350 FR=5499
1360 FOR T=1 TO 400
1370 FQ=FR+PEEK(S+27)*5.5
1380 HF=INT(FQ/256):LF=FQ-HF*256
1390 POKE S,LF:POKE S+1,HF
1400 NEXT:
1410 POKE S+24,0:RETURN
1420 REM *** OCEAN WAVES ***
1430 S=54272:FOR X=1TO24:POKES+X,0:NEXTX
1440 POKES+5,0:POKES+6,0
1450 POKES+4,129:POKES,125:POKES+1,55
1460 POKES+24,75
1470 FORL=1TO10
1480 D=INT(RND(1)*5)*50+50
1490 FOR M=8TO15
1500 POKES+24,M+64
1510 FOR N=1TOD:NEXTN:NEXTM
1520 FOR M=15TO8STEP-1
1530 POKES+24,M+64
1540 FOR N=1TOD:NEXTN:NEXTM:NEXTL
1550 S=54272:FOR X=1TO24:POKES+X,0:NEXTX
1560 RETURN
2000 S=54272: REM MOSQUITO
2010 FORL=0TO24:POKES+L,0:NEXT
2020 POKES+1,100
2030 POKES+5,219
2040 POKES+15,28
2050 POKES+24,15
2060 POKES+4,19
2070 FORT=1TO5000:NEXT
2080 POKES+4,18
2090 FORT=1TO1000:NEXT
2100 RETURN
2214 FOR T=1TO1000:NEXT T